using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using CimeaSoft.BE;

namespace CimeaSoft.Repository.Mapping
{
    public class MuestraMap : EntityTypeConfiguration<Muestra>
    {
        public MuestraMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.NumMuestra)
                .HasMaxLength(50);

            this.Property(t => t.TipMuestra)
                .HasMaxLength(50);

            this.Property(t => t.CantMuestra)
                .HasMaxLength(50);

            this.Property(t => t.Responsable)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Muestra");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.NumMuestra).HasColumnName("NumMuestra");
            this.Property(t => t.TipMuestra).HasColumnName("TipMuestra");
            this.Property(t => t.CantMuestra).HasColumnName("CantMuestra");
            this.Property(t => t.Fecha).HasColumnName("Fecha");
            this.Property(t => t.Responsable).HasColumnName("Responsable");
        }
    }
}
